﻿<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="configshop_sitecata.aspx.cs" Inherits="map.manage.configshop_sitecata" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

 <style type="text/css">
        *
        {   
            font-size:small;
	        margin: 0;
	        padding: 0;
        }
        a
        {
          text-decoration :none;
        	}
    </style>
     
    <script  type="text/javascript">
    window.onload=function(){
        loaddata();
//        self.parent.adjustFrameHeight(document.body.clientHeight,
//        self.window.frameElement.id,
//        self.parent.document.getElementById(self.window.frameElement.id).parentNode.parentNode.id
//        );
        var parentWindowPNode = parent.document.getElementById(self.window.frameElement.id).parentNode.parentNode;
        var frameObj = parent.document.getElementById(window.frameElement.id);
        var frmheight = (document.body.clientHeight);           
        frameObj.style.height = frmheight + "px";                
    }
    
    function loaddata(){ 
    var result = AjaxFunction.getwzfl(GetQueryString('id'));
        if (result.value != null && result.value != "") {
            var allStates = eval(result.value);
            if (allStates.length > 0) {
                for (var j = 0; j < allStates.length; j++) {
                    var divj = allStates[j].div;
                    var divid = divj.substring(0,divj.indexOf(":"));
                    var divhtml = divj.substring(divj.indexOf(":")+1);
                    var cdiv = document.getElementById("div"+divid);
                    if (cdiv!==null)
                    {
                        cdiv.innerHTML=divhtml;
                        if (divhtml !="")
                        {
                            cdiv.className ="sitecata_hascontent_div";
                        }
                    }
                }
            }
        }
        var nodeList = document. getElementsByTagName("a");//注明遍历范围；
        var wt;
        wt = parent.window.location.href;//获取当前网页的URL；
        wt = wt.replace('default1.aspx','default.aspx');
        wt = wt.replace('default2.aspx','default.aspx');
        wt = wt.replace('default3.aspx','default.aspx');       
        wt = wt.replace('default4.aspx','default.aspx');               
        for (var i = 0; i < nodeList.length; i++)//遍历定义范围内所有A元素；
        {
            if ( nodeList[i].href== wt) {
            nodeList[i].parentNode.className = "sitecata_active_div";
            }
            nodeList[i].className = "sitecata_hascontent_a";
            //首页
            if ( nodeList[i].href.indexOf("cbshoppageid=0&")!=-1
                && wt.indexOf("cbshoppageid=0&")!=-1
                ) {
                nodeList[i].parentNode.className = "sitecata_active_div";
                nodeList[i].className = "sitecata_active_a";
                }        

            //商品分类页
            if ( nodeList[i].href.indexOf("cbshoppageid=1&")!=-1
                && wt.indexOf("cbshoppageid=1&")!=-1
                ) {
                nodeList[i].parentNode.className = "sitecata_active_div";
                nodeList[i].className = "sitecata_active_a";
                }        
        }
    }
    //读取参数
      function GetQueryString(name) 
      {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
            var r = parent.window.location.search.substr(1).match(reg);
            if (r!=null) return unescape(r[2]); return null;
      }
    </script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Literal ID="Literalcss" runat="server"></asp:Literal>
    <asp:Literal ID="Literal1" runat="server"></asp:Literal>
    
    
    <table class=""></table>
    
</asp:Content>
